#include "Thread_Pool.hpp"
#include "Task.hpp"
#include "log.hpp"
#include <time.h>
int main()
{
    srand((unsigned long)time(nullptr));
    //ThreadPool<Task>* tp = new ThreadPool<Task>;
    ThreadPool<Task>* tp = ThreadPool<Task>::GetThreadpool();
    tp->run();
    while(1)
    {
        int x = (rand() ^ 0x123) % 500;
        int y = (rand() ^ 0x456) % 500;
        Task t(x,y,[](int x,int y)->int{return x + y;});
        tp->pushTask(t);
        sleep(1);
    }
    delete tp;
    return 0;
}